import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './baseApi/remjs/rem'

Vue.config.productionTip = false

import fyChatContent from '@cps/chatContent/'
import fyHeadTitle from '@cps/headTitle/'
import {fyButton,fyNegativeButton} from '@cps/button/'
import toast from '@cps/toast/index'
import fyChatTimeLine from '@cps/chatTimeLine/'
import fyMessageNotify from '@cps/messageNotify'
import toggleSwitch from '@cps/toggleSwitch'
// import searchResult from '@cps/searchResult'
import alert from '@cps/alert'
import confirm from '@cps/confirm'
import toolTip from '@cps/toolTip'
import tagsInput from '@cps/tagsInput'


Vue.use(toast)

//自定义组件
Vue.component('fy-chat-content', fyChatContent)
Vue.component('fy-head-title', fyHeadTitle)
Vue.component('fy-button', fyButton)
Vue.component('fy-negative-button', fyNegativeButton)
Vue.component('fy-chat-time-line', fyChatTimeLine)
Vue.component('fy-message-notify', fyMessageNotify)
Vue.component('fy-toggle-switch', toggleSwitch)
// Vue.component('fy-search-reasult', searchResult)
Vue.component('alert', alert)
Vue.component('confirm', confirm)
Vue.component('tool-tip', toolTip)
Vue.component('tags-input', tagsInput)

import fyChatXSwitch from '@cps/chatXSwitch'
import fyChatCheckbox from '@cps/chatCheckbox'
// import Actionsheet  from 'vux/src/components/actionsheet'
/**
 * 官网有一些 bug
 * 按照官方文档提示在项目入口文件中 全局注册 并不成功
 * import Vue from 'vue'
 * import { Actionsheet } from 'vux'
 * Vue.component('actionsheet', Actionsheet)
 * 
 * 把import { Actionsheet } from 'vux' 改成
 * import Actionsheet from 'vux/src/components/actionsheet' 即可
 * 
 * 但是局部注册却有效
 * import { Actionsheet } from 'vux'
 * export default {
 *  components: {
 *    Actionsheet
 *  }
 * }
 * 
 * actionsheet 用法有些问题
 * <group>
 *  <x-switch title="demo" v-model="show1"></x-switch>
 * </group>
 * 
 * <load-more :show-loading="true" tip='加载中...'></load-more>
 * */ 
// 二次封装组件
Vue.component('fy-chat-x-switch', fyChatXSwitch)
Vue.component('fy-chat-checkbox', fyChatCheckbox)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
